<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ page session="false" %>


  <form:form action="/billing/searchBill" commandName="billingEntryCriteria">
    
    <fieldset>
    <legend>Buscar una entrada</legend>
    
      <table>
      	<tr>
      		<td><form:label  path="id">Numero de entrada</form:label>
      		</td>
      		<td>
 				<form:input  path="id" />	
      		</td>
      		
      		<td><form:label  path="payer">Pagador</form:label>
      		</td>
      		<td>
     			<form:select path="payer.id">
      				<c:forEach items="${ownerList}" var="current" varStatus="status">
	      				<form:option value="${ownerList[status.count -1].id}" >${ownerList[status.count -1].firstFamilyName} ${ownerList[status.count -1].secondFamilyName},${ownerList[status.count -1].firstName}</form:option>
      				</c:forEach>
      			</form:select>		
      		</td>
      		
    		<td><form:label  path="payee">Beneficiario</form:label>
    		</td>
    		<td>
     			<form:select path="payee.id">
      				<c:forEach items="${ownerList}" var="current" varStatus="status">
	      				<form:option value="${ownerList[status.count -1].id}" >${ownerList[status.count -1].firstFamilyName} ${ownerList[status.count -1].secondFamilyName},${ownerList[status.count -1].firstName}</form:option>
      				</c:forEach>
      			</form:select>		
      		</td>
      	</tr>

		<tr>
		
			<td>
      			<form:label  path="date">Desde la fecha</form:label>
      		</td>	
      		<td>
      			<form:input  path="date" />
      		</td>
		
			<td>
      			<form:label  path="date">Hasta la fecha</form:label>
      		</td>
      		<td>	
      			<form:input  path="date" />
      		</td>
		
		
			<td>
      			<form:label path="concept" >Categoria</form:label>
      		</td>
      		<td>
      			<form:select path="concept.id">
      				<c:forEach items="${conceptList}" var="currentConcept" varStatus="status">
	      				<form:option value="${conceptList[status.count -1].id}" >${conceptList[status.count -1].description}</form:option>
      				</c:forEach>
      			</form:select>
			</td>	
		</tr>
      	
      </table>
    </fieldset>
    
    <input type="submit" value="Enviar" />
  </form:form>

